package com.triones.biz.infra.controller.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.stream.Stream;

@Getter
@AllArgsConstructor
public enum SceneEnum {
    NORMAL("默认", "normal"),
    FEEDBACK("意见反馈", "feedback"),
    ;
    private String info;
    private String scene;

    public static SceneEnum convert(String scene) {
        return Stream.of(values()).filter(i -> i.getScene().equalsIgnoreCase(scene)).findFirst().orElse(NORMAL);
    }
}
